Repository navigation
perf(birth): place a lifecycle birth on the live engine, no full-world checkpoint (Scaling A13) - #2624
perf(birth): place a lifecycle birth on the live engine, no full-world checkpoint (Scaling A13)#2624genekogan wants to merge 2 commits into
Conversation
…d checkpoint (Scaling A13) The lifecycle guard in drainInputs and the runner's preview ran probeNativeHumanBirth, a full snapshot and restore of the world, two or three times per birth (about 6-7 s of clock per birth on Eden 2026 with 50 acting). They now run MarsEngine.birthPlacementV1: spawnHuman's own placement search on the live engine, changing nothing, with the probe's verdict (humanBirthIssue) at the spot. The probe stays as the oracle: SIM_BIRTH_PROBE=1 decides by it, =oracle checks every placement against it. Same outcome, same reasons: no rule change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e navigation is unmoved (#2624 review) On whole ground the live search grew the ground window to the trial body and moved spatial.epoch, so a later far walk could be refused live and admitted on replay. nativeBirthPlacement now uses the probe there (livePlacementExact: no ground, or paged ground); placeNativeHumanBirth refuses it. The oracle tests also assert the epoch and window are unchanged by the live placement. engine-contract.md documents SIM_BIRTH_PROBE=1 (rollback) and =oracle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proof check:
|
| Check | Status | Detail |
|---|---|---|
| maintainer sign-off | ok | approved:maintainer added by @genekogan |
| problem statement | ok | present |
| linked issue | ok | #2621 |
| acceptance | ok | 3/3 met |
| carried from the issue | ok | all 3 issue criteria present |
| self-audit | ok | checks, failed attempts, long tail and limits filled |
| clip | ok | 1 video link(s), 1 image(s) |
| proof.json | ok | valid and agrees with the checklist |
| playtest | ok | baseline: 0/4, candidate: 4/4 |
| reviewer pass | ok | coordinator reviewer agent: no blocking defect; non-paged ground write (B1) fixed in 2c903b7, flag documented (B4) |
Acceptance criteria
| Criterion | Status | Evidence | |
|---|---|---|---|
| [x] | A1 An oracle test across many births in Eden 2026 (and a crowded variant) | met | proof.json and these results: |
| [x] | A2 No full-world snapshot or restore on the birth path; the probe runs on | met | on a world with no ground or paged ground (Eden 2026 and every default ground world: NAV_PAGED defaults on), the guard |
| [x] | A3 Bars declared before the runs (settled --wave, 100 creates at 1 a se |
met | proof.json. The bars and scoring rule were declared on the issue |
Proof links: 1 video, 1 image, proof.json linked.
Full-resolution videos — use the original clips and their proof metadata for motion/contact review. GIFs below are reduced previews.
Updated on every edit, push, label and review. How to fill it: .claude/skills/journal/SKILL.md. T3-T4 also need the maintainer's sign-off (tools/proof/gate.mjs). A maintainer can waive with the proof:waived label.
|
Coordinator sign-off (T3).
|

Problem
When a Soul is born through the lifecycle (the account and Eden capabilities path), a busy world runs
probeNativeHumanBirthtwo or three times per birth: a full snapshot of the world, then a restore that rebuilds the spatial ground. On Eden 2026 with 50 Souls acting, that is about 6 to 7 s of the clock thread per birth. At even one create a second the world goes black and restarts (exit 75), and 0 of 100 creates complete. This PR places the birth on the live engine instead. Closes #2621.Acceptance
A1 An oracle test across many births in Eden 2026 (and a crowded variant):
birthPlacementV1on the live engine agrees withprobeNativeHumanBirth's outcome (placement or refusal) on every case. State hashes are equal with the change off and on over the walk goldens and the birth tests. — evidence: proof.json and these results:node --test apps/server/src/birth-placement-eden.test.ts-> pass, 32 births on Eden 2026 compared:{"ready":30,"unavailable":2}. That is 16 plain births while a Soul walks, the arrival rings crowded until a birth is refused, and both hinted forms.node --test packages/engine-mars/src/birth.test.ts-> 10/10 pass. The crowd fills the arrival point on green field (91 ready, 4 refused, 4 hinted), on the legacy commons (13 ready, 4 refused, 4 hinted: thehumanBirthIssuerefusal) and on the safe commons (83 ready, 4 refused, 4 hinted). Existing, conflicting and deferred births are also covered. On every case the live outcome deep-equals the probe's, the state hash and tick are unchanged, andspawnHumanlands where the placement said.node --test apps/server/src/lifecycle-runner.test.ts-> 24/24 pass. A new test runs lifecycle births withSIM_BIRTH_PROBE=1(off), unset (on) and=oracle: the events, poses, engine state hash and kernel hash are equal.SIM_BIRTH_PROBE=oracle node --test packages/engine-mars/src/birth.test.ts packages/engine-mars/src/arrival-clearance.test.ts apps/server/src/lifecycle-runner.test.ts-> 35/35 pass, with every placement checked against the probe.spawnHuman's search is now an extraction with the same statements in the same order, and it has no switch.node tools/test-harness/walk/walk.mjs-> "walk: no place worse than the baseline". The hash-pinned engine tests (hash,commons-kitchen,terrain,water-geometry) pass 47/47, run together witharrival-clearance,commons,connected-shore-engineandcommons-arrival.A2 No full-world snapshot or restore on the birth path; the probe runs only under a test or oracle flag. — evidence: on a world with no ground or paged ground (Eden 2026 and every default ground world:
NAV_PAGEDdefaults on), the guard (lifecycle-runner.ts) and the preview (arrival-placement.tsplanNativeBirth) callnativeBirthPlacement, which runs the probe only whenSIM_BIRTH_PROBEis1ororacle. Test "A13: the birth path never snapshots or restores…" -> 0 snapshots and 0 restores by default. Test "four pending births … with no detached probe" -> 0 restores for four lifecycle births, against 8 withSIM_BIRTH_PROBE=1. One exception: a world on whole (non-paged) ground (NAV_PAGED=0) keeps the probe, because there the live search grew the ground window and moved the navigation epoch (review finding on this PR). Test 'A13: on whole (non-paged) ground…' covers it: same navigation and the same later far walk as a twin that never placed a birth. The oracle tests also assert the live placement leaves the epoch and window unmoved.A3 Bars declared before the runs (
settled --wave, 100 creates at 1 a second with 50 acting, 2 repeats, base against candidate): clock ms per birth down at least 80 %; no black and no exit 75 at 1 a second; creates completed reported. — evidence: proof.json. The bars and scoring rule were declared on the issue before any run (comment 6922107940) and scored once, as declared:Proof
Tier: T3 (
node tools/proof/tier.mjs)proof.json: https://assets.eden.art/proofs/pr-2624/proof-2.json
clips: Full-resolution video: join-burst-desktop.mp4, 1280×720, 23.8 s, uncut and real speed, timed-run 43906458152. On Eden 2026 with fake minds, twelve new Souls join one a second from 0:02.5 to 0:14.5 and all twelve are admitted. From 0:17 the camera follows Joiner1, standing with the others at the arrival point while the world runs. The clip was recorded on the candidate code plus the clip kit, which lives only on the proof branch
agent/2621-clip.images: none
playtest: the A3 timed runs above (2 repeats per arm per shape; candidate passed all 4, base none)
review: the coordinator's reviewer agent found no blocking defect; its findings B1 (non-paged ground) and B4 (the flag line in the docs) are fixed in 2c903b7
Self-audit
tsc --noEmit -p packages/engine-mars-> cleantsc --noEmit -p apps/server-> cleannode tools/test-harness/walk/walk.mjs-> no place worse than the baselinenode tools/changelog/compile.mjs --check-> 39 valid fragmentsspawnHuman's search twice: once in the guard and once in the apply. That is twowalk_toplans per ring spot tried, and it is A8a's proposed follow-up 2.LifecycleRunneris unchanged.birth.checkpoint-required). Keeping that answer is what makes this no rule change. The live placement no longer needs a checkpoint, so dropping the deferral would be a later rule change with its own id.spawnHumanextraction, which has no switch.docs/architecture/engine-contract.mdgets a Birth placement line documentingSIM_BIRTH_PROBE=1(rollback) and=oracle. The code comments inlifecycle-runner.ts,arrival-placement.ts,birth.tsandengine.tsare updated.Changelog
changes/2621-birth-on-live-engine.md(perf)Risk
SIM_BIRTH_PROBE=oraclechecks it live.SIM_BIRTH_PROBE=1on the world (the probe decides again), or revert this PR.Time: about 0.8 h of work against the 4 h ceiling. I started at 16:05 UTC and finished scoring at about 17:45 UTC; that 1.7 h of wall clock includes about 50 min waiting on runners. The work was the fix and the draft from 16:05 to 16:25, the review fixes from 16:30 to 16:40, and the A3 scoring, clip and proof from 17:30 to 17:45.
Outside Touches:
packages/engine-mars/src/engine.ts:spawnHuman's search extracted, plusbirthPlacementV1. The design names it ("movespawnHuman's placement into a read-onlybirthPlacementV1on the live engine").apps/server/src/arrival-placement.ts: the runner's preview (planNativeBirth) lives there.apps/server/src/birth-placement-eden.test.ts: a new test for the birth path.docs/architecture/engine-contract.md: one line documenting the flag (the coordinator asked for it).🤖 Generated with Claude Code